package com.siva.web;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.siva.domain.dao.CustomerMapper;
import com.siva.domain.sivadao.DemoMapper;



@RestController
@RequestMapping(value = "/")
public class CustomerCtroller {
    
    @Autowired
    private CustomerMapper customerMapper;
    @Autowired
    private DemoMapper demoMapper;
    
    @RequestMapping(value = "add")
    public String addCustomer() throws InterruptedException {
        for (int i = 0; i < 50; i++) {
            customerMapper.insert("siva", 18);
            Thread.sleep(100);
        }
        demoMapper.insert("siva");
        return "1";
    }
}
